/**
 * 
 */
package cvcg.dto;

import java.math.BigInteger;

import cvcg.model.Game;

/**
 * @author jaracje
 *
 */
public class GameSessionVoteDTO 
{
	private Long gameId;
	private String gameName;
	private Integer minPlayer;
	private Integer maxPlayer;
	private Integer duration;
	private Integer votes;
	public Long getGameId() {
		return gameId;
	}
	public void setGameId(Long gameId) {
		this.gameId = gameId;
	}
	public String getGameName() {
		return gameName;
	}
	public void setGameName(String gameName) {
		this.gameName = gameName;
	}
	public Integer getMinPlayer() {
		return minPlayer;
	}
	public void setMinPlayer(Integer minPlayer) {
		this.minPlayer = minPlayer;
	}
	public Integer getMaxPlayer() {
		return maxPlayer;
	}
	public void setMaxPlayer(Integer maxPlayer) {
		this.maxPlayer = maxPlayer;
	}
	public Integer getDuration() {
		return duration;
	}
	public void setDuration(Integer duration) {
		this.duration = duration;
	}
	public Integer getVotes() {
		return votes;
	}
	public void setVotes(Integer votes) {
		this.votes = votes;
	}
	public GameSessionVoteDTO(BigInteger gameId, String gameName, Integer minPlayer,
			Integer maxPlayer, Integer duration, BigInteger votes) {
		super();
		this.gameId = Long.valueOf(gameId.longValue());
		this.gameName = gameName;
		this.minPlayer = minPlayer;
		this.maxPlayer = maxPlayer;
		this.duration = duration;
		this.votes = Integer.valueOf(votes.intValue());
	}
	
	public String getDurationDecorator() 
	{				
		String decorator=null;
		Game game = new Game();
		game.setDuration(duration);
		if(game.isHeavyGame()) {
			decorator = "<IMG alt=\"Heavy\" src=\"../assets/images/_Weight_16x16.png\"/>"; 
		} else if (game.isNormalGame()) 
		{
			decorator = "<IMG alt=\"Normal\" src=\"../assets/images/_beer_16x16.png\"/>";
		} else {
			decorator = "<IMG alt=\"Short\" src=\"../assets/images/_cocktail_16x16.png\"/>";
		}
		return decorator;
	}
}
